package lab02.Test12;

/**
 * Created by lenovo on 2017/10/20.
 */
public class Circle extends Shape {
    double radius;
    final double PI = 3.141592;

    public Circle() {
    }

    public Circle(double radius) {
        this.radius = radius;
    }

    @Override
    public void girth() {
        super.girth();
        double girth = 2 * PI * radius;
        System.out.println("圆的周长为：" + girth);
    }

    @Override
    public void area() {
        super.area();
        double area = PI * radius * radius;
        System.out.println("圆的面积为：" + area);
    }
}

